```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MCP MongoDB Server - AI驱动的数据库管理工具</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #2d3748;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            background-color: #2d3748;
            color: #e2e8f0;
        }
        .mermaid {
            background-color: white;
            padding: 20px;
            border-radius: 0.5rem;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white min-h-screen flex items-center">
        <div class="container mx-auto px-6 py-24">
            <div class="max-w-4xl mx-auto text-center">
                <div class="inline-block bg-white bg-opacity-20 backdrop-blur-sm rounded-full px-6 py-2 mb-6">
                    <span class="text-sm font-medium">开源项目</span>
                </div>
                <h1 class="text-5xl md:text-6xl font-bold mb-6 leading-tight">MCP MongoDB Server</h1>
                <p class="text-xl md:text-2xl mb-10 leading-relaxed opacity-90">通过AI助手实现自然语言交互的MongoDB管理工具</p>
                <div class="flex flex-col sm:flex-row justify-center gap-4">
                    <a href="#features" class="bg-white text-indigo-700 hover:bg-gray-100 px-8 py-3 rounded-lg font-semibold transition duration-300 shadow-lg">探索功能</a>
                    <a href="https://github.com/kiliczsh/mcp-mongo-server" class="bg-transparent border-2 border-white hover:bg-white hover:bg-opacity-20 px-8 py-3 rounded-lg font-semibold transition duration-300 flex items-center justify-center gap-2">
                        <i class="fab fa-github"></i> GitHub
                    </a>
                </div>
            </div>
        </div>
    </section>

    <!-- Problem Section -->
    <section class="py-20 bg-white">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto">
                <h2 class="text-3xl font-bold mb-12 text-center">它能解决什么问题？</h2>
                <div class="grid md:grid-cols-2 gap-8">
                    <div class="bg-gray-50 p-8 rounded-xl shadow-sm">
                        <div class="text-indigo-600 text-4xl mb-4">
                            <i class="fas fa-exclamation-triangle"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3">传统工具的问题</h3>
                        <p class="text-gray-600 leading-relaxed">
                            传统MongoDB管理工具要求用户熟悉查询语言或复杂界面，操作门槛高，尤其对非技术用户或不熟悉NoSQL的开发者。
                        </p>
                    </div>
                    <div class="bg-gray-50 p-8 rounded-xl shadow-sm">
                        <div class="text-indigo-600 text-4xl mb-4">
                            <i class="fas fa-shield-alt"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3">AI集成挑战</h3>
                        <p class="text-gray-600 leading-relaxed">
                            AI助手通常无法直接访问数据库，导致流程中断。安全问题(如暴露数据库凭证)也限制了AI工具与数据库的集成。
                        </p>
                    </div>
                </div>
                <div class="mt-12 bg-indigo-50 border-l-4 border-indigo-500 p-6 rounded-r-lg">
                    <p class="text-indigo-800 font-medium">
                        <span class="text-2xl mr-2">✨</span> <strong>MCP MongoDB Server 正是为解决这些问题而生</strong>，通过MCP协议提供标准化的安全接口，让AI助手以自然语言执行数据库操作，简化工作流并增强安全性。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Features Section -->
    <section id="features" class="py-20 bg-gray-50">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-12 text-center">核心功能概述</h2>
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
                <div class="feature-card bg-white p-6 rounded-xl shadow-md transition duration-300">
                    <div class="text-indigo-600 text-3xl mb-4">
                        <i class="fas fa-database"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">集合模式检查</h3>
                    <p class="text-gray-600 leading-relaxed">
                        自动获取集合的schema信息，包括字段名称和数据类型，支持JSON格式输出，便于快速了解数据库结构。
                    </p>
                </div>
                <div class="feature-card bg-white p-6 rounded-xl shadow-md transition duration-300">
                    <div class="text-indigo-600 text-3xl mb-4">
                        <i class="fas fa-search"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">查询与聚合操作</h3>
                    <p class="text-gray-600 leading-relaxed">
                        执行MongoDB查询(filter、projection、limit)和聚合管道，支持执行计划分析，简化数据检索和分析。
                    </p>
                </div>
                <div class="feature-card bg-white p-6 rounded-xl shadow-md transition duration-300">
                    <div class="text-indigo-600 text-3xl mb-4">
                        <i class="fas fa-lock"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">只读模式</h3>
                    <p class="text-gray-600 leading-relaxed">
                        通过`--read-only`或环境变量启用只读模式，防止写操作(如更新、插入)，使用次级读取优先级，确保生产环境安全。
                    </p>
                </div>
                <div class="feature-card bg-white p-6 rounded-xl shadow-md transition duration-300">
                    <div class="text-indigo-600 text-3xl mb-4">
                        <i class="fas fa-id-card"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">智能ObjectId处理</h3>
                    <p class="text-gray-600 leading-relaxed">
                        支持`auto`、`none`和`force`三种模式，智能转换字符串ID和MongoDB ObjectId，适配不同场景。
                    </p>
                </div>
                <div class="feature-card bg-white p-6 rounded-xl shadow-md transition duration-300">
                    <div class="text-indigo-600 text-3xl mb-4">
                        <i class="fas fa-robot"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">AI集成</h3>
                    <p class="text-gray-600 leading-relaxed">
                        与Claude Desktop、Windsurf和Cursor等工具协作，支持自然语言查询，如"查找用户集合中年龄大于30的记录"。
                    </p>
                </div>
                <div class="feature-card bg-white p-6 rounded-xl shadow-md transition duration-300">
                    <div class="text-indigo-600 text-3xl mb-4">
                        <i class="fas fa-project-diagram"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">MCP生态兼容</h3>
                    <p class="text-gray-600 leading-relaxed">
                        与MCP生态中的其他服务器(如MySQL、Git)协同工作，支持复杂开发场景，优于单一数据库工具。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Use Cases Section -->
    <section class="py-20 bg-white">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-12 text-center">使用场景</h2>
            <div class="max-w-4xl mx-auto">
                <div class="mb-12">
                    <div class="flex items-center mb-4">
                        <div class="bg-indigo-100 text-indigo-700 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                            <i class="fas fa-chart-line text-xl"></i>
                        </div>
                        <h3 class="text-2xl font-semibold">数据分析师快速探索数据</h3>
                    </div>
                    <p class="text-gray-600 leading-relaxed mb-4">
                        一名分析师需要分析MongoDB中的销售数据。通过Claude Desktop输入"显示orders集合中最近30天的订单"，MCP MongoDB Server执行查询并返回结果，自动生成数据统计，无需手动编写聚合管道。
                    </p>
                    <div class="bg-gray-50 p-4 rounded-lg border-l-4 border-indigo-500">
                        <p class="font-medium text-gray-700">思考问题：</p>
                        <p class="text-gray-600">你的团队如何利用自然语言查询简化MongoDB数据分析流程？</p>
                    </div>
                </div>

                <div class="mb-12">
                    <div class="flex items-center mb-4">
                        <div class="bg-indigo-100 text-indigo-700 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                            <i class="fas fa-code text-xl"></i>
                        </div>
                        <h3 class="text-2xl font-semibold">开发者调试后端应用</h3>
                    </div>
                    <p class="text-gray-600 leading-relaxed">
                        开发团队调试Node.js应用，需检查MongoDB集合结构。使用MCP MongoDB Server，通过VS Code输入"列出users集合的schema"，快速获取字段详情，加速调试和开发。
                    </p>
                </div>

                <div>
                    <div class="flex items-center mb-4">
                        <div class="bg-indigo-100 text-indigo-700 w-12 h-12 rounded-full flex items-center justify-center mr-4">
                            <i class="fas fa-user-shield text-xl"></i>
                        </div>
                        <h3 class="text-2xl font-semibold">数据库管理员安全管理</h3>
                    </div>
                    <p class="text-gray-600 leading-relaxed">
                        管理员需定期检查生产数据库的集合信息。MCP MongoDB Server的只读模式确保AI助手安全访问数据库，生成模式分析报告，避免直接暴露管理权限。
                    </p>
                </div>
            </div>
        </div>
    </section>

    <!-- Architecture Diagram -->
    <section class="py-20 bg-gray-50">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-12 text-center">系统架构</h2>
            <div class="max-w-4xl mx-auto">
                <div class="mermaid">
                    graph TD
                        A[AI助手\n(Claude/Windsurf/Cursor)] -->|自然语言请求| B[MCP MongoDB Server]
                        B -->|MCP协议| C[MongoDB数据库]
                        C -->|查询结果| B
                        B -->|结构化响应| A
                        D[开发人员] -->|配置| B
                        B -->|日志/状态| D
                </div>
            </div>
        </div>
    </section>

    <!-- Pros & Cons -->
    <section class="py-20 bg-white">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-12 text-center">优势与特色</h2>
            <div class="max-w-4xl mx-auto">
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-green-600">优势</h3>
                        <ul class="space-y-4">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>自然语言交互：</strong>通过MCP协议，AI助手可处理自然语言请求，优于MongoDB Compass的手动操作界面，降低学习曲线。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>安全设计：</strong>只读模式和次级读取优先级确保生产环境安全，内置ObjectId转换防止查询错误，优于直接数据库连接。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>开源与跨平台：</strong>基于MIT许可，使用TypeScript开发，支持Docker部署，适配macOS、Windows和Linux，适合本地化部署。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>MCP生态兼容：</strong>与MCP生态中的其他服务器(如MySQL、Git)协同工作，支持复杂开发场景，优于单一数据库工具。</span>
                            </li>
                        </ul>
                    </div>
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-red-600">局限性</h3>
                        <ul class="space-y-4">
                            <li class="flex items-start">
                                <i class="fas fa-exclamation-circle text-red-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>非独立运行：</strong>需与MCP客户端(如Claude Desktop)集成，不适合作为独立工具使用。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-exclamation-circle text-red-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>功能限制：</strong>默认只读，写操作需额外配置，可能不适合需要频繁更新的场景。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-exclamation-circle text-red-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>配置复杂性：</strong>需熟悉JSON配置和环境变量，对新手有一定门槛。</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-exclamation-circle text-red-500 mt-1 mr-3"></i>
                                <span class="text-gray-700"><strong>社区维护：</strong>开源项目依赖社区更新，存在90+开放问题，可能影响新功能开发或错误修复。</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Getting Started -->
    <section class="py-20 bg-indigo-50">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-12 text-center">上手指南</h2>
            <div class="max-w-4xl mx-auto">
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <span class="bg-indigo-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">1</span>
                        准备环境
                    </h3>
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <p class="text-gray-700 mb-4">确保MongoDB服务器运行，创建专用用户：</p>
                        <div class="code-block p-4 rounded-md mb-4 overflow-x-auto">
                            <pre class="text-gray-300"><code>use your_database;
db.createUser({ 
  user: "mcp_user", 
  pwd: "secure_password", 
  roles: [{ role: "read", db: "your_database" }] 
});</code></pre>
                        </div>
                        <ul class="text-gray-700 space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>安装Node.js 18+：Linux(<code class="bg-gray-100 px-1 rounded">sudo apt install nodejs</code>)，macOS(<code class="bg-gray-100 px-1 rounded">brew install node</code>)，Windows(从<a href="https://nodejs.org" class="text-indigo-600 hover:underline">nodejs.org</a>下载)</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>安装Git：Linux(<code class="bg-gray-100 px-1 rounded">sudo apt install git</code>)，macOS(<code class="bg-gray-100 px-1 rounded">brew install git</code>)，Windows(从<a href="https://git-scm.com" class="text-indigo-600 hover:underline">git-scm.com</a>下载)</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                                <span>(可选)安装Docker：Linux(<code class="bg-gray-100 px-1 rounded">sudo apt install docker.io</code>)，macOS/Windows(从<a href="https://www.docker.com" class="text-indigo-600 hover:underline">docker.com</a>下载)</span>
                            </li>
                        </ul>
                    </div>
                </div>

                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <span class="bg-indigo-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">2</span>
                        安装MCP MongoDB Server
                    </h3>
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <p class="text-gray-700 mb-4 font-medium">全局安装：</p>
                        <div class="code-block p-4 rounded-md mb-4 overflow-x-auto">
                            <pre class="text-gray-300"><code>npm install -g mcp-mongo-server</code></pre>
                        </div>
                        <p class="text-gray-700 mb-4 font-medium">Docker方式(推荐)：</p>
                        <div class="code-block p-4 rounded-md mb-4 overflow-x-auto">
                            <pre class="text-gray-300"><code>docker run -it -d -e MCP_MONGODB_URI="mongodb://mcp_user:secure_password@localhost:27017/your_database" -e MCP_MONGODB_READONLY="true" mcp-mongo-server</code></pre>
                        </div>
                        <p class="text-gray-700 mb-4 font-medium">开发安装：</p>
                        <div class="code-block p-4 rounded-md overflow-x-auto">
                            <pre class="text-gray-300"><code>git clone https://github.com/kiliczsh/mcp-mongo-server.git
cd mcp-mongo-server
npm install
npm run build</code></pre>
                        </div>
                    </div>
                </div>

                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <span class="bg-indigo-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">3</span>
                        配置MCP
                    </h3>
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <p class="text-gray-700 mb-4">编辑~/.vscode/mcp.json或Claude Desktop的配置文件：</p>
                        <div class="code-block p-4 rounded-md overflow-x-auto">
                            <pre class="text-gray-300"><code>{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": ["-y", "mcp-mongo-server", "mongodb://mcp_user:secure_password@localhost:27017/your_database"]
    },
    "mongodb-readonly": {
      "command": "npx",
      "args": ["-y", "mcp-mongo-server", "mongodb://mcp_user:secure_password@localhost:27017/your_database", "--read-only"],
      "env": {
        "MCP_MONGODB_URI": "mongodb://mcp_user:secure_password@localhost:27017/your_database",
        "MCP_MONGODB_READONLY": "true"
      }
    }
  }
}</code></pre>
                        </div>
                    </div>
                </div>

                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 flex items-center">
                        <span class="bg-indigo-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">4</span>
                        与AI助手交互
                    </h3>
                    <div class="bg-white p-6 rounded-lg shadow-sm">
                        <p class="text-gray-700 mb-4">在Claude Desktop、Windsurf或Cursor中，输入自然语言查询：</p>
                        <div class="grid md:grid-cols-2 gap-4">
                            <div class="bg-gray-100 p-4 rounded-lg">
                                <p class="text-gray-700 font-medium mb-2">示例1:</p>
                                <p class="text-gray-600">"列出your_database中所有集合的schema。"</p>
                            </div>
                            <div class="bg-gray-100 p-4 rounded-lg">
                                <p class="text-gray-700 font-medium mb-2">示例2:</p>
                                <p class="text-gray-600">"执行users集合中age > 30的查询，返回name和email，限制20条。"</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- CTA Section -->
    <section class="py-20 bg-indigo-600 text-white">
        <div class="container mx-auto px-6 text-center">
            <h2 class="text-3xl font-bold mb-6">开始使用MCP MongoDB Server</h2>
            <p class="text-xl mb-10 max-w-2xl mx-auto opacity-90">通过自然语言交互简化您的MongoDB管理流程，提高开发效率</p>
            <a href="https://github.com/kiliczsh/mcp-mongo-server" class="inline-block bg-white text-indigo-700 hover:bg-gray-100 px-8 py-3 rounded-lg font-semibold transition duration-300 shadow-lg flex items-center justify-center mx-auto gap-2">
                <i class="fab fa-github"></i> 访问GitHub仓库
            </a>
        </div>
    </section>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>
```